.TH keymon 8
'''
.SH NAME
\fBkeymon\fR \- keyboard event monitor
'''
.SH DESCRIPTION
\fBkeymon\fR listens for certain events on all available keyboards
(as well as some other input devices) and spawns certain scripts when
configured events occur.
'''
.SH CONFIGURATION
Events to watch for are described in /etc/keymon, one per line,
using the following format:
.IP "" 4
[\fImode\fR] [\fBC-\fR][\fBA-\fR]\fIkey\fB:\fR \fIcommand\fR [\fIargument\fR]
.P
\fIkey\fR is either a numeric code (see input-event-codes.h from the Linux
kernel sources for the full list) or one of the supported names:
\fBF1\fR-\fBF12\fR, \fBEsc\fR, \fBPower\fR, \fBSleep\fR and some others
(see keymon sources). Prefixes \fBC-\fR and \fBA-\fR denote Control and Alt
modifiers respectively.
.P
\fImode\fR specifies the kind of event the would trigger the action.
Default is a momentary key press, \fBhold\fR means holding the key down
for about 1s, and \fBlong\fR for about 10s.
.P
When the event happens, \fBkeymon\fR spawns \fIcommand\fR,
optionally passing it a single \fIargument\fR.
'''
.SH FILES
.IP "/dev/input/event*" 4
Input devices.
.IP "/etc/keymon" 4
Configuration file.
'''
.SH NOTES
\fBkeymon\fR never spawns two scripts at the same time, no matter how
fast the events arrive. The commands in /etc/keymon must be short-running.
.P
Some x86 systems are incapable of reporting long Power button hold, and
thus do not allow "hold Power" configuration. Use \fBinputs\fR(8) in \fB-r\fR
mode to check button behavior. Affected systems will report release event
immediately after the press event even if the button is still being held.
.P
Modifier keys state is tracked indiscriminately across all devices.
C-A-F1 action will be triggered even if respective Control, Alt and F1
keys are located on three different devices. This may sound unintuitive,
but allows handling cross-device combinations like C-A-Power.
'''
.SH SEE ALSO
\fBacpid\fR(8), \fBinputs\fR(1)
